package com.yj.web.WeChat.Bean;

import com.yj.web.util.json.WxGsonBuilder;
import lombok.Data;

/**
 * Created by yanlinyang on 2017/9/11.
 */
@Data
public class WxUser {
    protected Integer subscribe;
    protected String openId;
    protected String nickname;
    protected String sex;
    protected String language;
    protected String city;
    protected String province;
    protected String country;
    protected String headImgUrl;
    protected Long subscribeTime;
    protected String unionId;
    protected Integer sexId;
    protected String remark;
    protected Integer groupId;

    public static WxUser fromJson(String json) {
        return WxGsonBuilder.INSTANCE.create().fromJson(json, WxUser.class);
    }

    @Override
    public String toString() {
        return "WxMpUser{" +
                "subscribe=" + subscribe +
                ", openId='" + openId + '\'' +
                ", nickname='" + nickname + '\'' +
                ", sex='" + sex + '\'' +
                ", language='" + language + '\'' +
                ", city='" + city + '\'' +
                ", province='" + province + '\'' +
                ", country='" + country + '\'' +
                ", headImgUrl='" + headImgUrl + '\'' +
                ", subscribeTime=" + subscribeTime +
                ", unionId='" + unionId + '\'' +
                ", remark='" + remark + '\'' +
                ", groupId='" + groupId + '\'' +
                '}';
    }
}
